/* 重构后的章节编辑器样式 */
.chapter-editor {
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #f8f9fa;
  width: 100%;
  overflow: hidden;
}

/* 加载状态 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
}

.loading-text {
  margin-top: 16px;
  color: #666;
  font-size: 14px;
}

/* 空状态 */
.empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
}

/* 编辑器容器 */
.editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  margin-bottom: 8px;
}

.editor-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 编辑器面板 */
.editor-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 编辑输入容器 */
.editor-input-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* 内容编辑器 */
.content-editor {
  flex: 1;
  min-height: 0;
  padding: 16px;
  border: none;
  border-radius: 8px;
  background-color: #fff;
  resize: none;
  font-family: inherit;
  line-height: 1.6;
  transition: all 0.3s ease;
  outline: none;
}

.content-editor:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 160, 88, 0.2);
}

/* 预览面板 */
.preview-pane {
  flex: 1;
  min-height: 0;
  background-color: #fff;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 加载遮罩容器 */
.loading-overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* 底部标签页 */
.editor-tabs {
  flex-shrink: 0;
  background-color: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
  border-top: 1px solid #eee;
  position: relative;
  z-index: 10;
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

/* 自定义滚动条 */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #c1c1c1 #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

:deep(.n-tabs) {
  height: 33px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

:deep(.n-tabs .n-tabs-nav) {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  order: 1;
}

:deep(.n-tabs .n-tabs-nav--bottom) {
  order: 1;
}

:deep(.n-tabs .n-tabs-pane-wrapper) {
  order: 0;
  display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .editor-tabs .n-tabs-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  
  .editor-tabs .n-tabs-tab {
    flex-shrink: 0;
  }
}